<div>
  <h2 ng-i18next>avAdmin.sidebar.successAction</h2>

  <form role="form" name="successActionForm" class="form form-horizontal">
    <div class="form-group">
    <div class="col-xs-12">
        <p class="text-muted">
          <span ng-i18next>
            avAdmin.successAction.modeIntro
          </span>
          <a href="" class="learn-more" target="_blank" ng-i18next>
            avAdmin.learnMore
          </a>
        </p>
        <!-- vote mode -->
        <label
          for="vote-mode-radio"
          class="radio"
          ng-class="{
            'selected': action.mode === 'vote',
            'disabled': !electionEditable()}">
          <input
            id="vote-mode-radio"
            type="radio"
            name="mode-radio"
            ng-disabled="!electionEditable()"
            value="vote"
            ng-model="action.mode" />
          <span class="header" ng-i18next="avAdmin.successAction.voteModeTitle">
          </span>
          <span
            class="description"
            ng-i18next="avAdmin.successAction.voteModeDescription">
          </span>
        </label>

        <!-- go to url mode -->
        <label
          for="url-mode-radio"
          class="radio"
          ng-class="{
            'selected': action.mode === 'go-to-url',
            'disabled': !electionEditable()}">
          <input
            id="url-mode-radio"
            type="radio"
            name="mode-radio"
            ng-disabled="!electionEditable()"
            value="go-to-url"
            ng-model="action.mode" />
          <span class="header" ng-i18next="avAdmin.successAction.urlModeTitle">
          </span>
          <p
            class="description"
            ng-i18next="avAdmin.successAction.urlModeDescription">
          </p>
          <input
            id="url-to-load"
            type="url"
            name="urlToLoad"
            class="input-block form-control"
            ng-disabled="!electionEditable() || action.mode !== 'go-to-url'"
            ng-i18next="[placeholder]avAdmin.successAction.urlModePlaceholder"
            ng-model="action['mode-config'].url" />

          <div class="input-error">
            <span
              class="error text-brand-danger"
              ng-show="successActionForm.urlToLoad.$error.url"
              ng-i18next>
              avAdmin.successAction.invalidUrl
            </span>
          </div>
        </label>
      </div>
    </div>
  </form>

  <button
    ui-sref="admin.create()"
    ng-if="!election.id"
    class="btn btn-block btn-success"
    ng-i18next>
    next
  </button>
</div>
